#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

#include "language_entry.h"

typedef struct
{
    uint32_t index;
    const char * lang[3];
}language_entry_t;


#undef   LANGUAGE_ENTRY
#define  LANGUAGE_ENTRY(macro, lang1, lang2, lang3) \
    { .lang[0] = lang1, .lang[1] = lang2, .lang[2] = lang3 },


const language_entry_t   g_entry_table[] =
{
    { .lang[0] = "123", .lang[1] = "123", .lang[2] = "123", },
    #include "language_entry_table.txt"
    { .lang[0] = "123", .lang[1] = "123", .lang[2] = "123", },
};
#undef   LANGUAGE_ENTRY

uint32_t g_language_index = 0;

void language_index_set(uint32_t language_index)
{
    g_language_index = language_index;
}

const char * language_entry_get(uint32_t index)
{
    return g_entry_table[index].lang[g_language_index];
}

uint32_t language_entry_size(void)
{
    return (LANGUAGE_INDEX_MAX - 1);
}

